package com.gj.baselib;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.gj.baselib.powermanager.PowerManagerActivity;
import com.gj.baselib.sysutils.AndroidAppUtils;
import com.gj.baselib.sysutils.AppUtilsActivity;
import com.gj.baselib.sysutils.SysUtilsActivity;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.event.OnClick;

public class MainActivity extends Activity {

	private Context context = null;

	@OnClick(R.id.btn_gotoAppInfoscreen)
	private void gotoApplicatinoInfoscreen(View view) {
		Intent intent = new Intent(context, AppUtilsActivity.class);

		startActivity(intent);
	}

	@OnClick(R.id.btn_gotoSystemInfoscreen)
	private void gotoSystemInfoscreen(View view) {
		Intent intent = new Intent(context, SysUtilsActivity.class);

		startActivity(intent);
	}

	@OnClick(R.id.btn_PowerManage)
	private void gotoPowerManageScreenrelative(View view) {
		Intent intent = new Intent(context, PowerManagerActivity.class);

		startActivity(intent);
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		context = this;

		ViewUtils.inject(this);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();

		AndroidAppUtils.exit();
	}

}
